//
//  MyOtherTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/21.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "MyOtherTableViewCell.h"

@implementation MyOtherTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier theSection:(NSInteger)s_num{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        CGFloat butWidth = (KScreenWidth - kWidthProportion_In_iPhoneTriploid(75))/3;
        NSArray * butTitleArr;
        NSArray * imageArr;
        if (s_num == 1) {
            butTitleArr = @[@"我的关注",@"我的求购",@"钢铁计算器"];
            imageArr = @[@"icon_wodeguanzhu",@"icon_wodeqiugou",@"icon_gangtiejisuanqi"];
        }else{
            butTitleArr = @[@"我的钱包",@"发票管理",@"地址管理"];
            imageArr = @[@"icon_wodeqianbao",@"icon_fapiaoguanli",@"icon_dizhiguanli"];
        }
        for (int i=0; i<butTitleArr.count; i++) {
            GLGWButton * pursBut = [[GLGWButton alloc] initWithFrame:CGRectMake(butWidth*i, kHeightProportion_In_iPhoneTriploid(8), butWidth, kHeightProportion_In_iPhoneTriploid(80)) titleText:butTitleArr[i] titleLableFont:SYSTEMFONT(13) titleLableColor:[UIColor colorWithHexString:@"#666666"] inSuperView:self];
            pursBut.tag = 210+i;
            pursBut.image_Name = imageArr[i];
            [pursBut setImagePositionWithType:SSImagePositionTypeTop spacing:kHeightProportion_In_iPhoneTriploid(10)];
            [pursBut addTarget:self action:@selector(butAction:) forControlEvents:UIControlEventTouchUpInside];
        }
    }
    return self;
}

-(void)butAction:(GLGWButton *)sender{
    if (self.Block_SeleButAction) {
        self.Block_SeleButAction(sender);
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
